﻿#ifndef MEDIAIMGSERVER_H
#define MEDIAIMGSERVER_H

#include <QObject>
#include <QTcpServer>
#include <QList>
#include "mediaimgsocket.h"

class MediaImgSocket;
class MediaImgServer : public QTcpServer
{
    Q_OBJECT
public:
    explicit MediaImgServer(QObject *parent = nullptr);
    static MediaImgServer& getInstance();
    void incomingConnection(qintptr handle);//有客户端连接就会触发此信号
    void tranData(QByteArray ba,QString id);//转发数据
signals:

private:
    QList<MediaImgSocket*>  list;//保存客户端的socket

};

#endif // MEDIAIMGSERVER_H
